/*
 *  GERenderedObject.h
 *  GETestRender
 *
 *  Created by Quoc Dung Chu on 19/07/11.
 *  Copyright 2011 Paris 6. All rights reserved.
 *
 */

#ifndef GE_RENDERED_OBJECT_H
#define GE_RENDERED_OBJECT_H

#include "GEList.h"

class GERenderedOject;

class GERenderedWorld  {
private:
	GERenderedWorld(){}
	static GERenderedWorld*	sSharedRenderedWorld ;
public:
	GERenderedOject* renderedObject;
	static GERenderedWorld* sharedRenderedWorld()
	{
		if(!sSharedRenderedWorld) sSharedRenderedWorld = new GERenderedWorld();
		return sSharedRenderedWorld;
	}
	
	void draw();
	
	
};

class GERenderedOject {
public:
	GERenderedOject()
	{ 
		GERenderedWorld::sharedRenderedWorld()->renderedObject = this;
	}
	void draw(){}
};

#pragma mark -
#pragma mark Implementation

void GERenderedWorld::draw()
{
	this->renderedObject->draw();
}


#endif